<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: SDO client</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__CO__SDOclient.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">SDO client<div class="ingroups"><a class="el" href="group__CO__CANopen__301.html">CANopen_301</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__SDOclient_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__SDOclient_8h.html">CO_SDOclient.h</a></td></tr>
<tr class="memdesc:CO__SDOclient_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Service Data Object - client protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">SDO client object.  <a href="structCO__SDOclient__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga4f33f56f950c61a931f5a60e80e553d5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#ga4f33f56f950c61a931f5a60e80e553d5">CO_SDOclient_init</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *OD_SDOcliParam, const <a class="el" href="structOD__t.html">OD_t</a> *OD, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevRx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevRxIdx, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevTx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevTxIdx)</td></tr>
<tr class="memdesc:ga4f33f56f950c61a931f5a60e80e553d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SDO client object.  <a href="group__CO__SDOclient.html#ga4f33f56f950c61a931f5a60e80e553d5">More...</a><br /></td></tr>
<tr class="separator:ga4f33f56f950c61a931f5a60e80e553d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4377eaecc3bd0a8320a2bbe1ef0ef776"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#ga4377eaecc3bd0a8320a2bbe1ef0ef776">CO_SDOclient_initCallbackPre</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDOclient, void *object, void(*pFunctSignal)(void *object))</td></tr>
<tr class="memdesc:ga4377eaecc3bd0a8320a2bbe1ef0ef776"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SDOclient callback function.  <a href="group__CO__SDOclient.html#ga4377eaecc3bd0a8320a2bbe1ef0ef776">More...</a><br /></td></tr>
<tr class="separator:ga4377eaecc3bd0a8320a2bbe1ef0ef776"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade3bf4e3249aa4c611570ec43563a08d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#gade3bf4e3249aa4c611570ec43563a08d">CO_SDOclient_setup</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> COB_IDClientToServer, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> COB_IDServerToClient, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeIDOfTheSDOServer)</td></tr>
<tr class="memdesc:gade3bf4e3249aa4c611570ec43563a08d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup SDO client object.  <a href="group__CO__SDOclient.html#gade3bf4e3249aa4c611570ec43563a08d">More...</a><br /></td></tr>
<tr class="separator:gade3bf4e3249aa4c611570ec43563a08d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga40f6e79592e1d587d02bbb4eaefa9489"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#ga40f6e79592e1d587d02bbb4eaefa9489">CO_SDOclientDownloadInitiate</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> index, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> subIndex, size_t sizeIndicated, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> SDOtimeoutTime_ms, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> blockEnable)</td></tr>
<tr class="memdesc:ga40f6e79592e1d587d02bbb4eaefa9489"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initiate SDO download communication.  <a href="group__CO__SDOclient.html#ga40f6e79592e1d587d02bbb4eaefa9489">More...</a><br /></td></tr>
<tr class="separator:ga40f6e79592e1d587d02bbb4eaefa9489"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf58b7731b4285538c26a0c7c49ab24b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#gaf58b7731b4285538c26a0c7c49ab24b6">CO_SDOclientDownloadInitiateSize</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, size_t sizeIndicated)</td></tr>
<tr class="memdesc:gaf58b7731b4285538c26a0c7c49ab24b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initiate SDO download communication - update size.  <a href="group__CO__SDOclient.html#gaf58b7731b4285538c26a0c7c49ab24b6">More...</a><br /></td></tr>
<tr class="separator:gaf58b7731b4285538c26a0c7c49ab24b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga958d0568bd47d9a3152f9ea8d104b5f5"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#ga958d0568bd47d9a3152f9ea8d104b5f5">CO_SDOclientDownloadBufWrite</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, const char *buf, size_t count)</td></tr>
<tr class="memdesc:ga958d0568bd47d9a3152f9ea8d104b5f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write data into SDO client buffer.  <a href="group__CO__SDOclient.html#ga958d0568bd47d9a3152f9ea8d104b5f5">More...</a><br /></td></tr>
<tr class="separator:ga958d0568bd47d9a3152f9ea8d104b5f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab262f0a8d08ba023639a2c197d0943a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#gaab262f0a8d08ba023639a2c197d0943a">CO_SDOclientDownload</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> abort, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> bufferPartial, <a class="el" href="group__CO__SDOserver.html#ga7587ddcf798747fe6d97d03bf1bf2979">CO_SDO_abortCode_t</a> *SDOabortCode, size_t *sizeTransferred, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:gaab262f0a8d08ba023639a2c197d0943a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process SDO download communication.  <a href="group__CO__SDOclient.html#gaab262f0a8d08ba023639a2c197d0943a">More...</a><br /></td></tr>
<tr class="separator:gaab262f0a8d08ba023639a2c197d0943a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3180f82563b3ed768fe7d3bd34fe1886"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#ga3180f82563b3ed768fe7d3bd34fe1886">CO_SDOclientUploadInitiate</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> index, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> subIndex, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> SDOtimeoutTime_ms, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> blockEnable)</td></tr>
<tr class="memdesc:ga3180f82563b3ed768fe7d3bd34fe1886"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initiate SDO upload communication.  <a href="group__CO__SDOclient.html#ga3180f82563b3ed768fe7d3bd34fe1886">More...</a><br /></td></tr>
<tr class="separator:ga3180f82563b3ed768fe7d3bd34fe1886"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab44dabaf3deb88ffcf7c4ef72300287d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#gab44dabaf3deb88ffcf7c4ef72300287d">CO_SDOclientUpload</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__SDOserver.html#ga7587ddcf798747fe6d97d03bf1bf2979">CO_SDO_abortCode_t</a> *SDOabortCode, size_t *sizeIndicated, size_t *sizeTransferred, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:gab44dabaf3deb88ffcf7c4ef72300287d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process SDO upload communication.  <a href="group__CO__SDOclient.html#gab44dabaf3deb88ffcf7c4ef72300287d">More...</a><br /></td></tr>
<tr class="separator:gab44dabaf3deb88ffcf7c4ef72300287d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf5cd4e009476b15a2cd995a9841fb175"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#gaf5cd4e009476b15a2cd995a9841fb175">CO_SDOclientUploadBufRead</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, char *buf, size_t count)</td></tr>
<tr class="memdesc:gaf5cd4e009476b15a2cd995a9841fb175"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read data from SDO client buffer.  <a href="group__CO__SDOclient.html#gaf5cd4e009476b15a2cd995a9841fb175">More...</a><br /></td></tr>
<tr class="separator:gaf5cd4e009476b15a2cd995a9841fb175"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9b98ea2c36f864f1a589c842528b12ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SDOclient.html#ga9b98ea2c36f864f1a589c842528b12ab">CO_SDOclientClose</a> (<a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C)</td></tr>
<tr class="memdesc:ga9b98ea2c36f864f1a589c842528b12ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close SDO communication temporary.  <a href="group__CO__SDOclient.html#ga9b98ea2c36f864f1a589c842528b12ab">More...</a><br /></td></tr>
<tr class="separator:ga9b98ea2c36f864f1a589c842528b12ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen Service Data Object - client protocol (master functionality).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__CO__SDOserver.html">SDO server</a> </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga4f33f56f950c61a931f5a60e80e553d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4f33f56f950c61a931f5a60e80e553d5">&#9670;&nbsp;</a></span>CO_SDOclient_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_SDOclient_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *&#160;</td>
          <td class="paramname"><em>OD_SDOcliParam</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structOD__t.html">OD_t</a> *&#160;</td>
          <td class="paramname"><em>OD</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevRx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevRxIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevTx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevTxIdx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SDO client object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDO_C</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">OD_SDOcliParam</td><td>OD entry for SDO client parameter (0x1280+). It may have IO extension enabled to allow dynamic configuration (see also <a class="el" href="group__CO__STACK__CONFIG__COMMON.html#gaf0f46ccffdd156cc7c2d8774ecb2060d">CO_CONFIG_FLAG_OD_DYNAMIC</a>). </td></tr>
    <tr><td class="paramname">OD</td><td>Object Dictionary. It is used in case, if client is accessing object dictionary from its own device. If NULL, it will be ignored. </td></tr>
    <tr><td class="paramname">nodeId</td><td>CANopen Node ID of this device. It is used in case, if client is accessing object dictionary from its own device. If 0, it will be ignored. </td></tr>
    <tr><td class="paramname">CANdevRx</td><td>CAN device for SDO client reception. </td></tr>
    <tr><td class="paramname">CANdevRxIdx</td><td>Index of receive buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANdevTx</td><td>CAN device for SDO client transmission. </td></tr>
    <tr><td class="paramname">CANdevTxIdx</td><td>Index of transmit buffer in the above CAN device.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a>: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="ga4377eaecc3bd0a8320a2bbe1ef0ef776"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4377eaecc3bd0a8320a2bbe1ef0ef776">&#9670;&nbsp;</a></span>CO_SDOclient_initCallbackPre()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_SDOclient_initCallbackPre </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDOclient</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SDOclient callback function. </p>
<p>Function initializes optional callback function, which should immediately start processing of <a class="el" href="group__CO__SDOclient.html#gaab262f0a8d08ba023639a2c197d0943a" title="Process SDO download communication.">CO_SDOclientDownload()</a> or <a class="el" href="group__CO__SDOclient.html#gab44dabaf3deb88ffcf7c4ef72300287d" title="Process SDO upload communication.">CO_SDOclientUpload()</a> function. Callback is called after SDOclient message is received from the CAN bus or when new call without delay is necessary (exchange data with own SDO server or SDO block transfer is in progress).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDOclient</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL. </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gade3bf4e3249aa4c611570ec43563a08d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gade3bf4e3249aa4c611570ec43563a08d">&#9670;&nbsp;</a></span>CO_SDOclient_setup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a> CO_SDOclient_setup </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>COB_IDClientToServer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>COB_IDServerToClient</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeIDOfTheSDOServer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setup SDO client object. </p>
<p>Function is called in from <a class="el" href="group__CO__SDOclient.html#ga4f33f56f950c61a931f5a60e80e553d5" title="Initialize SDO client object.">CO_SDOclient_init()</a> and each time when "SDO client parameter" is written. Application can call this function before new SDO communication. If parameters to this function are the same as before, then CAN is not reconfigured.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDO_C</td><td>This object. </td></tr>
    <tr><td class="paramname">COB_IDClientToServer</td><td>See <a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a>. </td></tr>
    <tr><td class="paramname">COB_IDServerToClient</td><td>See <a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a>. </td></tr>
    <tr><td class="paramname">nodeIDOfTheSDOServer</td><td>Node-ID of the SDO server. If it is the same as node-ID of this node, then data will be exchanged with this node (without CAN communication).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73" title="Return values from SDO server or client functions.">CO_SDO_return_t</a>, CO_SDO_RT_ok_communicationEnd or CO_SDO_RT_wrongArguments </dd></dl>

</div>
</div>
<a id="ga40f6e79592e1d587d02bbb4eaefa9489"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga40f6e79592e1d587d02bbb4eaefa9489">&#9670;&nbsp;</a></span>CO_SDOclientDownloadInitiate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a> CO_SDOclientDownloadInitiate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>subIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizeIndicated</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>SDOtimeoutTime_ms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>blockEnable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initiate SDO download communication. </p>
<p>Function initiates SDO download communication with server specified in <a class="el" href="group__CO__SDOclient.html#ga4f33f56f950c61a931f5a60e80e553d5" title="Initialize SDO client object.">CO_SDOclient_init()</a> function. Data will be written to remote node. Function is non-blocking.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDO_C</td><td>This object. </td></tr>
    <tr><td class="paramname">index</td><td>Index of object in object dictionary in remote node. </td></tr>
    <tr><td class="paramname">subIndex</td><td>Subindex of object in object dictionary in remote node. </td></tr>
    <tr><td class="paramname">sizeIndicated</td><td>Optionally indicate size of data to be downloaded. Actual data are written with one or multiple <a class="el" href="group__CO__SDOclient.html#ga958d0568bd47d9a3152f9ea8d104b5f5" title="Write data into SDO client buffer.">CO_SDOclientDownloadBufWrite()</a> calls.<ul>
<li>If sizeIndicated is different than 0, then total number of data written by <a class="el" href="group__CO__SDOclient.html#ga958d0568bd47d9a3152f9ea8d104b5f5" title="Write data into SDO client buffer.">CO_SDOclientDownloadBufWrite()</a> will be compared against sizeIndicated. Also sizeIndicated info will be passed to the server, which will compare actual data size downloaded. In case of mismatch, SDO abort message will be generated.</li>
<li>If sizeIndicated is 0, then actual data size will not be verified. </li>
</ul>
</td></tr>
    <tr><td class="paramname">SDOtimeoutTime_ms</td><td>Timeout time for SDO communication in milliseconds. </td></tr>
    <tr><td class="paramname">blockEnable</td><td>Try to initiate block transfer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73" title="Return values from SDO server or client functions.">CO_SDO_return_t</a> </dd></dl>

</div>
</div>
<a id="gaf58b7731b4285538c26a0c7c49ab24b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf58b7731b4285538c26a0c7c49ab24b6">&#9670;&nbsp;</a></span>CO_SDOclientDownloadInitiateSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_SDOclientDownloadInitiateSize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizeIndicated</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initiate SDO download communication - update size. </p>
<p>This is optional function, which updates sizeIndicated, if it was not known in the <a class="el" href="group__CO__SDOclient.html#ga40f6e79592e1d587d02bbb4eaefa9489" title="Initiate SDO download communication.">CO_SDOclientDownloadInitiate()</a> function call. This function can be used after <a class="el" href="group__CO__SDOclient.html#ga958d0568bd47d9a3152f9ea8d104b5f5" title="Write data into SDO client buffer.">CO_SDOclientDownloadBufWrite()</a>, but must be used before <a class="el" href="group__CO__SDOclient.html#gaab262f0a8d08ba023639a2c197d0943a" title="Process SDO download communication.">CO_SDOclientDownload()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDO_C</td><td>This object. </td></tr>
    <tr><td class="paramname">sizeIndicated</td><td>Same as in <a class="el" href="group__CO__SDOclient.html#ga40f6e79592e1d587d02bbb4eaefa9489" title="Initiate SDO download communication.">CO_SDOclientDownloadInitiate()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga958d0568bd47d9a3152f9ea8d104b5f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga958d0568bd47d9a3152f9ea8d104b5f5">&#9670;&nbsp;</a></span>CO_SDOclientDownloadBufWrite()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t CO_SDOclientDownloadBufWrite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write data into SDO client buffer. </p>
<p>This function copies data from buf into internal SDO client fifo buffer. Function returns number of bytes successfully copied. If there is not enough space in destination, not all bytes will be copied. Additional data can be copied in next cycles. If there is enough space in destination and sizeIndicated is different than zero, then all data must be written at once.</p>
<p>This function is basically a wrapper for <a class="el" href="group__CO__CANopen__301__fifo.html#ga715cb5e1feacd2f3af5bc8195bbe69d3" title="Write data into CO_fifo_t object.">CO_fifo_write()</a> function. As alternative, other functions from CO_fifo can be used directly, for example <a class="el" href="group__CO__CANopen__301__fifo.html#ga1788f69639bcc6bfa59bf85e57e5e13a" title="Read ascii string from src fifo and copy as uint8_t variable to dest fifo.">CO_fifo_cpyTok2U8()</a> or similar.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDO_C</td><td>This object. </td></tr>
    <tr><td class="paramname">buf</td><td>Buffer which will be copied </td></tr>
    <tr><td class="paramname">count</td><td>Number of bytes in buf</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes actually written. </dd></dl>

</div>
</div>
<a id="gaab262f0a8d08ba023639a2c197d0943a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaab262f0a8d08ba023639a2c197d0943a">&#9670;&nbsp;</a></span>CO_SDOclientDownload()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a> CO_SDOclientDownload </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>abort</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>bufferPartial</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__SDOserver.html#ga7587ddcf798747fe6d97d03bf1bf2979">CO_SDO_abortCode_t</a> *&#160;</td>
          <td class="paramname"><em>SDOabortCode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>sizeTransferred</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process SDO download communication. </p>
<p>Function must be called cyclically until it returns &lt;=0. It Proceeds SDO download communication initiated with <a class="el" href="group__CO__SDOclient.html#ga40f6e79592e1d587d02bbb4eaefa9489" title="Initiate SDO download communication.">CO_SDOclientDownloadInitiate()</a>. Function is non-blocking.</p>
<p>If function returns <a class="el" href="group__CO__SDOserver.html#gga7f729ab203285c7623df493916f22a73aa8036db7f41e8958c057da0d4ab24f8f" title="Block download is in progress.">CO_SDO_RT_blockDownldInProgress</a> and OS has buffer for CAN tx messages, then this function may be called multiple times within own loop. This can speed-up SDO block transfer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">SDO_C</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">abort</td><td>If true, SDO client will send abort message from SDOabortCode and transmission will be aborted. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">bufferPartial</td><td>True indicates, not all data were copied to internal buffer yet. Buffer will be refilled later with <a class="el" href="group__CO__SDOclient.html#ga958d0568bd47d9a3152f9ea8d104b5f5" title="Write data into SDO client buffer.">CO_SDOclientDownloadBufWrite</a>. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">SDOabortCode</td><td>In case of error in communication, SDO abort code contains reason of error. Ignored if NULL. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">sizeTransferred</td><td>Actual size of data transferred. Ignored if NULL </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga7a36da54b801074032622708e06a742e" title="Process CANopen objects.">CO_process()</a>. Ignored if NULL.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73" title="Return values from SDO server or client functions.">CO_SDO_return_t</a>. If less than 0, then error occurred, SDOabortCode contains reason and state becomes idle. If 0, communication ends successfully and state becomes idle. If greater than 0, then communication is in progress. </dd></dl>

</div>
</div>
<a id="ga3180f82563b3ed768fe7d3bd34fe1886"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3180f82563b3ed768fe7d3bd34fe1886">&#9670;&nbsp;</a></span>CO_SDOclientUploadInitiate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a> CO_SDOclientUploadInitiate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>subIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>SDOtimeoutTime_ms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>blockEnable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initiate SDO upload communication. </p>
<p>Function initiates SDO upload communication with server specified in <a class="el" href="group__CO__SDOclient.html#ga4f33f56f950c61a931f5a60e80e553d5" title="Initialize SDO client object.">CO_SDOclient_init()</a> function. Data will be read from remote node. Function is non-blocking.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDO_C</td><td>This object. </td></tr>
    <tr><td class="paramname">index</td><td>Index of object in object dictionary in remote node. </td></tr>
    <tr><td class="paramname">subIndex</td><td>Subindex of object in object dictionary in remote node. </td></tr>
    <tr><td class="paramname">SDOtimeoutTime_ms</td><td>Timeout time for SDO communication in milliseconds. </td></tr>
    <tr><td class="paramname">blockEnable</td><td>Try to initiate block transfer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73" title="Return values from SDO server or client functions.">CO_SDO_return_t</a> </dd></dl>

</div>
</div>
<a id="gab44dabaf3deb88ffcf7c4ef72300287d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab44dabaf3deb88ffcf7c4ef72300287d">&#9670;&nbsp;</a></span>CO_SDOclientUpload()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73">CO_SDO_return_t</a> CO_SDOclientUpload </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__SDOserver.html#ga7587ddcf798747fe6d97d03bf1bf2979">CO_SDO_abortCode_t</a> *&#160;</td>
          <td class="paramname"><em>SDOabortCode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>sizeIndicated</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>sizeTransferred</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process SDO upload communication. </p>
<p>Function must be called cyclically until it returns &lt;=0. It Proceeds SDO upload communication initiated with <a class="el" href="group__CO__SDOclient.html#ga3180f82563b3ed768fe7d3bd34fe1886" title="Initiate SDO upload communication.">CO_SDOclientUploadInitiate()</a>. Function is non-blocking.</p>
<p>If this function returns <a class="el" href="group__CO__SDOserver.html#gga7f729ab203285c7623df493916f22a73ada069dad6b1e0bec180600b1d34758d2" title="Data buffer is full.">CO_SDO_RT_uploadDataBufferFull</a>, then data must be read from fifo buffer to make it empty. This function can then be called once again immediately to speed-up block transfer. Note also, that remaining data must be read after function returns <a class="el" href="group__CO__SDOserver.html#gga7f729ab203285c7623df493916f22a73a2d0d1d8d1bc297205b3e87174642199c" title="Success, end of communication.">CO_SDO_RT_ok_communicationEnd</a>. Data must not be read, if function returns <a class="el" href="group__CO__SDOserver.html#gga7f729ab203285c7623df493916f22a73ad73a50f4a1d7ef69797cbf7c930293f2" title="Block upload is in progress.">CO_SDO_RT_blockUploadInProgress</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">SDO_C</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">SDOabortCode</td><td>In case of error in communication, SDO abort code contains reason of error. Ignored if NULL. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">sizeIndicated</td><td>If larger than 0, then SDO server has indicated size of data transfer. Ignored if NULL. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">sizeTransferred</td><td>Actual size of data transferred. Ignored if NULL </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga7a36da54b801074032622708e06a742e" title="Process CANopen objects.">CO_process()</a>. Ignored if NULL.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__SDOserver.html#ga7f729ab203285c7623df493916f22a73" title="Return values from SDO server or client functions.">CO_SDO_return_t</a>. If less than 0, then error occurred, SDOabortCode contains reason and state becomes idle. If 0, communication ends successfully and state becomes idle. If greater than 0, then communication is in progress. </dd></dl>

</div>
</div>
<a id="gaf5cd4e009476b15a2cd995a9841fb175"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf5cd4e009476b15a2cd995a9841fb175">&#9670;&nbsp;</a></span>CO_SDOclientUploadBufRead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t CO_SDOclientUploadBufRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read data from SDO client buffer. </p>
<p>This function copies data from internal fifo buffer of SDO client into buf. Function returns number of bytes successfully copied. It can be called in multiple cycles, if data length is large.</p>
<p>This function is basically a wrapper for <a class="el" href="group__CO__CANopen__301__fifo.html#gad0ba8be2a601030a374913e4fa94e6cb" title="Read data from CO_fifo_t object.">CO_fifo_read()</a> function. As alternative, other functions from CO_fifo can be used directly, for example <a class="el" href="group__CO__CANopen__301__fifo.html#ga50b3075a0cfab3ab8608a4ba4977ecd6" title="Read uint8_t variable from fifo and output as ascii string.">CO_fifo_readU82a()</a> or similar.</p>
<dl class="section warning"><dt>Warning</dt><dd>This function (or similar) must NOT be called when <a class="el" href="group__CO__SDOclient.html#gab44dabaf3deb88ffcf7c4ef72300287d" title="Process SDO upload communication.">CO_SDOclientUpload()</a> returns <a class="el" href="group__CO__SDOserver.html#gga7f729ab203285c7623df493916f22a73ad73a50f4a1d7ef69797cbf7c930293f2" title="Block upload is in progress.">CO_SDO_RT_blockUploadInProgress</a>!</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDO_C</td><td>This object. </td></tr>
    <tr><td class="paramname">buf</td><td>Buffer into which data will be copied </td></tr>
    <tr><td class="paramname">count</td><td>Copy up to count bytes into buffer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes actually read. </dd></dl>

</div>
</div>
<a id="ga9b98ea2c36f864f1a589c842528b12ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9b98ea2c36f864f1a589c842528b12ab">&#9670;&nbsp;</a></span>CO_SDOclientClose()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_SDOclientClose </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close SDO communication temporary. </p>
<p>Function must be called after finish of each SDO client communication cycle. It disables reception of SDO client CAN messages. It is necessary, because CO_SDOclient_receive function may otherwise write into undefined SDO buffer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SDO_C</td><td>This object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Sat Sep 19 2020 10:03:20 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
